﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm2.aspx.cs" Inherits="web.ClientMgr.WebForm2" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    
        <asp:TextBox ID="TextBox1" runat="server">1</asp:TextBox>
        <br />
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="MemberID" 
            DataSourceID="SqlDataSource1" onrowcommand="GridView1_RowCommand">
            <Columns>
                <asp:BoundField DataField="MemberID" HeaderText="MemberID" 
                    InsertVisible="False" ReadOnly="True" SortExpression="MemberID" />
                <asp:BoundField DataField="MemberNO" HeaderText="MemberNO" 
                    SortExpression="MemberNO" />
                <asp:BoundField DataField="MemberName" HeaderText="MemberName" 
                    SortExpression="MemberName" />
                <asp:BoundField DataField="MemberSex" HeaderText="MemberSex" 
                    SortExpression="MemberSex" />
                <asp:BoundField DataField="MemberBirthday" HeaderText="MemberBirthday" 
                    SortExpression="MemberBirthday" />
                <asp:BoundField DataField="MemberEduDegree" HeaderText="MemberEduDegree" 
                    SortExpression="MemberEduDegree" />
                <asp:BoundField DataField="MemberCountryPlace" HeaderText="MemberCountryPlace" 
                    SortExpression="MemberCountryPlace" />
                <asp:BoundField DataField="MemberRegisterPlace" 
                    HeaderText="MemberRegisterPlace" SortExpression="MemberRegisterPlace" />
                <asp:BoundField DataField="MemberIDCardNO" HeaderText="MemberIDCardNO" 
                    SortExpression="MemberIDCardNO" />
                <asp:BoundField DataField="MemberIDCardAddress" 
                    HeaderText="MemberIDCardAddress" SortExpression="MemberIDCardAddress" />
                <asp:BoundField DataField="MemberOtherCardName" 
                    HeaderText="MemberOtherCardName" SortExpression="MemberOtherCardName" />
                <asp:BoundField DataField="MemberOtherCardNO" HeaderText="MemberOtherCardNO" 
                    SortExpression="MemberOtherCardNO" />
                <asp:BoundField DataField="MemberIsHouseMaster" 
                    HeaderText="MemberIsHouseMaster" SortExpression="MemberIsHouseMaster" />
                <asp:BoundField DataField="MemberHouseMasterRelation" 
                    HeaderText="MemberHouseMasterRelation" 
                    SortExpression="MemberHouseMasterRelation" />
                <asp:BoundField DataField="MemberProfession" HeaderText="MemberProfession" 
                    SortExpression="MemberProfession" />
                <asp:BoundField DataField="MemberTel" HeaderText="MemberTel" 
                    SortExpression="MemberTel" />
                <asp:BoundField DataField="MemberCorpName" HeaderText="MemberCorpName" 
                    SortExpression="MemberCorpName" />
                <asp:BoundField DataField="MemberPolityProperty" 
                    HeaderText="MemberPolityProperty" SortExpression="MemberPolityProperty" />
                <asp:BoundField DataField="MemberNation" HeaderText="MemberNation" 
                    SortExpression="MemberNation" />
                <asp:BoundField DataField="MemberDesp" HeaderText="MemberDesp" 
                    SortExpression="MemberDesp" />
            </Columns>
            <EmptyDataTemplate>
                <asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" 
                    DataKeyNames="MemberID" DataSourceID="SqlDataSource1" DefaultMode="Insert" 
                    Height="50px" oniteminserted="DetailsView1_ItemInserted" Width="125px">
                    <Fields>
                        <asp:BoundField DataField="MemberID" HeaderText="MemberID" 
                            InsertVisible="False" ReadOnly="True" SortExpression="MemberID" />
                        <asp:BoundField DataField="MemberNO" HeaderText="MemberNO" 
                            SortExpression="MemberNO" />
                        <asp:BoundField DataField="MemberName" HeaderText="MemberName" 
                            SortExpression="MemberName" />
                        <asp:BoundField DataField="MemberSex" HeaderText="MemberSex" 
                            SortExpression="MemberSex" />
                        <asp:BoundField DataField="MemberBirthday" HeaderText="MemberBirthday" 
                            SortExpression="MemberBirthday" />
                        <asp:BoundField DataField="MemberEduDegree" HeaderText="MemberEduDegree" 
                            SortExpression="MemberEduDegree" />
                        <asp:BoundField DataField="MemberCountryPlace" HeaderText="MemberCountryPlace" 
                            SortExpression="MemberCountryPlace" />
                        <asp:BoundField DataField="MemberRegisterPlace" 
                            HeaderText="MemberRegisterPlace" SortExpression="MemberRegisterPlace" />
                        <asp:BoundField DataField="MemberIDCardNO" HeaderText="MemberIDCardNO" 
                            SortExpression="MemberIDCardNO" />
                        <asp:BoundField DataField="MemberIDCardAddress" 
                            HeaderText="MemberIDCardAddress" SortExpression="MemberIDCardAddress" />
                        <asp:BoundField DataField="MemberOtherCardName" 
                            HeaderText="MemberOtherCardName" SortExpression="MemberOtherCardName" />
                        <asp:BoundField DataField="MemberOtherCardNO" HeaderText="MemberOtherCardNO" 
                            SortExpression="MemberOtherCardNO" />
                        <asp:BoundField DataField="MemberIsHouseMaster" 
                            HeaderText="MemberIsHouseMaster" SortExpression="MemberIsHouseMaster" />
                        <asp:BoundField DataField="MemberHouseMasterRelation" 
                            HeaderText="MemberHouseMasterRelation" 
                            SortExpression="MemberHouseMasterRelation" />
                        <asp:BoundField DataField="MemberProfession" HeaderText="MemberProfession" 
                            SortExpression="MemberProfession" />
                        <asp:BoundField DataField="MemberTel" HeaderText="MemberTel" 
                            SortExpression="MemberTel" />
                        <asp:BoundField DataField="MemberCorpName" HeaderText="MemberCorpName" 
                            SortExpression="MemberCorpName" />
                        <asp:BoundField DataField="MemberPolityProperty" 
                            HeaderText="MemberPolityProperty" SortExpression="MemberPolityProperty" />
                        <asp:BoundField DataField="MemberNation" HeaderText="MemberNation" 
                            SortExpression="MemberNation" />
                        <asp:BoundField DataField="MemberDesp" HeaderText="MemberDesp" 
                            SortExpression="MemberDesp" />
                        <asp:CommandField ShowInsertButton="True" />
                    </Fields>
                </asp:DetailsView>
            </EmptyDataTemplate>
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:pmsConnectionString %>" 
            DeleteCommand="DELETE FROM [ClientOfClientDetailMember] WHERE [MemberID] = @MemberID" 
            InsertCommand="INSERT INTO [ClientOfClientDetailMember] ([MemberNO], [MemberName], [MemberSex], [MemberBirthday], [MemberEduDegree], [MemberCountryPlace], [MemberRegisterPlace], [MemberIDCardNO], [MemberIDCardAddress], [MemberOtherCardName], [MemberOtherCardNO], [MemberIsHouseMaster], [MemberHouseMasterRelation], [MemberProfession], [MemberTel], [MemberCorpName], [MemberPolityProperty], [MemberNation], [MemberDesp]) VALUES (@MemberNO, @MemberName, @MemberSex, @MemberBirthday, @MemberEduDegree, @MemberCountryPlace, @MemberRegisterPlace, @MemberIDCardNO, @MemberIDCardAddress, @MemberOtherCardName, @MemberOtherCardNO, @MemberIsHouseMaster, @MemberHouseMasterRelation, @MemberProfession, @MemberTel, @MemberCorpName, @MemberPolityProperty, @MemberNation, @MemberDesp)" 
            SelectCommand="SELECT [MemberID], [MemberNO], [MemberName], [MemberSex], [MemberBirthday], [MemberEduDegree], [MemberCountryPlace], [MemberRegisterPlace], [MemberIDCardNO], [MemberIDCardAddress], [MemberOtherCardName], [MemberOtherCardNO], [MemberIsHouseMaster], [MemberHouseMasterRelation], [MemberProfession], [MemberTel], [MemberCorpName], [MemberPolityProperty], [MemberNation], [MemberDesp] FROM [ClientOfClientDetailMember] WHERE ([ClientID] = @ClientID)" 
            
            UpdateCommand="UPDATE [ClientOfClientDetailMember] SET [MemberNO] = @MemberNO, [MemberName] = @MemberName, [MemberSex] = @MemberSex, [MemberBirthday] = @MemberBirthday, [MemberEduDegree] = @MemberEduDegree, [MemberCountryPlace] = @MemberCountryPlace, [MemberRegisterPlace] = @MemberRegisterPlace, [MemberIDCardNO] = @MemberIDCardNO, [MemberIDCardAddress] = @MemberIDCardAddress, [MemberOtherCardName] = @MemberOtherCardName, [MemberOtherCardNO] = @MemberOtherCardNO, [MemberIsHouseMaster] = @MemberIsHouseMaster, [MemberHouseMasterRelation] = @MemberHouseMasterRelation, [MemberProfession] = @MemberProfession, [MemberTel] = @MemberTel, [MemberCorpName] = @MemberCorpName, [MemberPolityProperty] = @MemberPolityProperty, [MemberNation] = @MemberNation, [MemberDesp] = @MemberDesp WHERE [MemberID] = @MemberID">
            <SelectParameters>
                <asp:ControlParameter ControlID="TextBox1" Name="ClientID" PropertyName="Text" 
                    Type="Int32" />
            </SelectParameters>
            <DeleteParameters>
                <asp:Parameter Name="MemberID" Type="Int32" />
            </DeleteParameters>
            <UpdateParameters>
                <asp:Parameter Name="MemberNO" Type="String" />
                <asp:Parameter Name="MemberName" Type="String" />
                <asp:Parameter Name="MemberSex" Type="String" />
                <asp:Parameter Name="MemberBirthday" Type="DateTime" />
                <asp:Parameter Name="MemberEduDegree" Type="String" />
                <asp:Parameter Name="MemberCountryPlace" Type="String" />
                <asp:Parameter Name="MemberRegisterPlace" Type="String" />
                <asp:Parameter Name="MemberIDCardNO" Type="String" />
                <asp:Parameter Name="MemberIDCardAddress" Type="String" />
                <asp:Parameter Name="MemberOtherCardName" Type="String" />
                <asp:Parameter Name="MemberOtherCardNO" Type="String" />
                <asp:Parameter Name="MemberIsHouseMaster" Type="String" />
                <asp:Parameter Name="MemberHouseMasterRelation" Type="String" />
                <asp:Parameter Name="MemberProfession" Type="String" />
                <asp:Parameter Name="MemberTel" Type="String" />
                <asp:Parameter Name="MemberCorpName" Type="String" />
                <asp:Parameter Name="MemberPolityProperty" Type="String" />
                <asp:Parameter Name="MemberNation" Type="String" />
                <asp:Parameter Name="MemberDesp" Type="String" />
                <asp:Parameter Name="MemberID" Type="Int32" />
            </UpdateParameters>
            <InsertParameters>
                <asp:Parameter Name="MemberNO" Type="String" />
                <asp:Parameter Name="MemberName" Type="String" />
                <asp:Parameter Name="MemberSex" Type="String" />
                <asp:Parameter Name="MemberBirthday" Type="DateTime" />
                <asp:Parameter Name="MemberEduDegree" Type="String" />
                <asp:Parameter Name="MemberCountryPlace" Type="String" />
                <asp:Parameter Name="MemberRegisterPlace" Type="String" />
                <asp:Parameter Name="MemberIDCardNO" Type="String" />
                <asp:Parameter Name="MemberIDCardAddress" Type="String" />
                <asp:Parameter Name="MemberOtherCardName" Type="String" />
                <asp:Parameter Name="MemberOtherCardNO" Type="String" />
                <asp:Parameter Name="MemberIsHouseMaster" Type="String" />
                <asp:Parameter Name="MemberHouseMasterRelation" Type="String" />
                <asp:Parameter Name="MemberProfession" Type="String" />
                <asp:Parameter Name="MemberTel" Type="String" />
                <asp:Parameter Name="MemberCorpName" Type="String" />
                <asp:Parameter Name="MemberPolityProperty" Type="String" />
                <asp:Parameter Name="MemberNation" Type="String" />
                <asp:Parameter Name="MemberDesp" Type="String" />
            </InsertParameters>
        </asp:SqlDataSource>
    
    </div>
    </form>
</body>
</html>
